//
//  CZPullDownToRefreshControl.swift
//  iOSWeibo10
//
//  Created by ge on 16/5/18.
//  Copyright © 2016年 ge. All rights reserved.
//

import UIKit

/// 高度
private let CZPullDownToRefreshControlHeight: CGFloat = 60

/// 下拉刷新控件
class CZPullDownToRefreshControl: UIView {
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }

    // 外面创建直接调用[[CZPullDownToRefreshControl alloc] init] -> init(frame: CGRect)
    override init(frame: CGRect) {
        let newFrame = CGRect(x: 0, y: -CZPullDownToRefreshControlHeight, width: UIScreen.mainScreen().bounds.width, height: CZPullDownToRefreshControlHeight)
        super.init(frame: newFrame)
        
        prepareUI()
    }

    private func prepareUI() {
        backgroundColor = UIColor.brownColor()
    }
}
